$(function(){
	 $('#pics').cycle({ 
         fx:    'scrollRight' 
        });
	var sMenu =$("#sMenu").val();
	var mMenu = $("#mMenu").val();
	var mmMenu = $("#mmMenu").val();
	var basePath = $("#basePath").val();
	var kindurl = basePath +"view/TraderBook_BookKind/showBookKinds";
	var url = basePath +"Backend/showMajor";
	var url1 =url ;
	var url2="";
	var url3 = "";
	 var first="";
	 var second = "";
	 var third = "";
	switch(sMenu)
	{
	case "backend":
		order(mMenu);
		break;
	}
	function order(secondid)
	{
		url2 = url + "TraderBook_TraderCenter/buyBook/1";
		$("#"+secondid).addClass("active");
		switch(secondid)
		{
		case "1":
			first = "添加专业";
			break;
		case "2":
			first = "添加学院";
			break;
		case "3":
			first = "添加学校";
			break;
		case "4":
			first = "添加省份";
			break;
		case "5":
			first = "添加一级分类";
			break;
		case "6":
			first = "添加二级分类";
			break;
		case "7":
			first = "所有投诉";
			break;
		case "8":
			first = "被禁用户";
			break;
		}
	}
	showPosition(first,second,third);
	function showPosition(first,second,third)
	{
		var position = "";
		if(first=="" || first==null)
		{
		      position="当前位置:<font style='color:#990000;font-size:15px;'>首页</font>";	
		}else{
			if(second==null || second=="")
			{
				position = "当前位置:<a href='"+url1+"'>首页</a> >"+"<font style='color:#990000;font-size:15px;'>" +first+"</font>";
			}else{
				if(third==null || third=="")
				{
					position = "当前位置:<a href='"+url1+"'>首页</a> > <a href='"+url2+"'>"+first + "</a> > " +"<font style='color:#990000;font-size:15px;'>" +second +"</fon>";
				}else{
					position = "当前位置:<a href='"+url1+"'>首页</a> > "+"<a href='"+kindurl+"'>图书分类</a> > " +"<a href='"+url2+"'>" + second+"</a> > "+"<font style='color:#990000;font-size:15px;'>"+ third +"</font>" ;
				}
			}
		}
		$("#position").html(position);
	}
});